Zum Hauptinhalt springen
POST
/
public
/
v1
/
toppie
/
campaigns
[BETA] Create Toppie Campaign
curl --request POST \
  --url https://api.topsort.com/public/v1/toppie/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "budget": 123,
  "targets": [
    "<string>"
  ],
  "targetRoas": 10.25,
  "budgetPeriod": "daily",
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "adFormat": "banner",
  "chargeType": "CPM",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "budget": 123,
  "budgetPeriod": "daily",
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "targetRoas": 10.25,
  "currencyCode": "<string>",
  "isActive": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "bidCount": 123
}

Autorisierungen

Authorization
string
header
erforderlich

A valid API key generated in Topsort's UI.

Body

application/json

Campaign fields to create a new agency campaign.

name
string
erforderlich

Campaign name, this will be propagated to campaigns in marketplaces

Required string length: 1 - 75
budget
integer
erforderlich

Total budget for this campaign, to be distributed across marketplaces

targets
string[]
erforderlich

List of targets for the campaign

targetRoas
number
erforderlich

Target ROAS for the campaign

Erforderlicher Bereich: 0.5 <= x <= 20
budgetPeriod
enum<string>
Standard:daily

The periodicity of the budget

Verfügbare Optionen:
daily,
weekly,
monthly,
total
startDate
string<date-time>

Date when to start the campaign, specified in RFC 3339, if not set that campaign will start immediately after the campaign creation. Must include the Timezone definition.

endDate
string<date-time>

Date when to stop the campaign, specified in RFC 3339, if not set the campaign will never stop. This date must be greater than the start date and must be in the future. Must include the Timezone definition.

Antwort

Successful Response

Represents a public version of an agency campaign, used in API responses.

id
string<uuid>
erforderlich

Internal identifier for the agency campaign

name
string
erforderlich

Campaign name

adFormat
enum<string>
erforderlich

The ad format for this campaign

Verfügbare Optionen:
banner,
listing
chargeType
enum<string>
erforderlich

The charge type for this campaign

Verfügbare Optionen:
CPM,
CPC,
CPA
accountId
string<uuid>
erforderlich

Account that owns this campaign

budget
integer
erforderlich

Total budget for this campaign

budgetPeriod
enum<string>
erforderlich

The periodicity of the budget

Verfügbare Optionen:
daily,
weekly,
monthly,
total
startDate
string<date-time>
erforderlich

Date when the campaign starts, specified in RFC 3339. Must include the Timezone definition.

endDate
string<date-time>
erforderlich

Date when the campaign ends, specified in RFC 3339. Must include the Timezone definition.

targetRoas
number
erforderlich

Target ROAS for the campaign

Erforderlicher Bereich: 0.5 <= x <= 20
currencyCode
string
erforderlich

Currency code this campaign is working with in ISO 4217 format

Beispiel:

"USD"

isActive
boolean
erforderlich

Flag to indicate if the campaign is active or not

createdAt
string<date-time>
erforderlich

Date and time when the campaign was created

bidCount
integer | null

Bid count for the campaign (optional)